<template>
  <router-view />
</template>

<script setup>
const debounce = (fn, delay) => {
  let timer;
  return (...args) => {
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => {
      fn(...args);
    }, delay);
  };
};

const _ResizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 200);
    super(callback);
  }
};
</script>

<style lang="less">
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}
body {
  margin: 0;
  padding: 20px;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  color: #333;
}
* {
  box-sizing: border-box;
}
.search-box {
  .el-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 20px;
  }
}
.btns-box {
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pagination-container {
  padding: 20px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
</style>
